<template>
  <div>
    <hr />
    <div>
      <router-link to="/home">首页</router-link>&nbsp;&nbsp;
      <router-link to="/category">分类</router-link>&nbsp;&nbsp;
      <router-link to="/list">订单</router-link>&nbsp;&nbsp;
      <router-link to="/my">我的</router-link>
      <h1>显示路由切换的页面↓</h1>
    </div>
    <hr />
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
/* 精确匹配 路径一个都不能差*/
.router-link-exact-active {
  color: red;
}
.router-link-active {
  color: red;
}
</style>